package com.gopay.bis.ccb.cbrmb.impl;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.gopay.bis.ccb.cbrmb.operation.CbRmbSocketTransportImpl;
import com.gopay.common.domain.bank.ccb.cbrmb.req.CbRmbNotificationMsg;
import com.gopay.common.domain.bank.ccb.cbrmb.req.CbRmbQueryReqMsg;
import com.gopay.common.domain.bank.ccb.cbrmb.res.CbRmbQueryRespMsg;
import com.gopay.common.domain.bank.ccb.cbrmb.res.CbRmbResponseMsg;
import com.gopay.common.exception.GopayException;
import com.gopay.remote.bank.cbrmb.CbRmbCcbBankRemoteService;

public class CbRmbCcbBankServiceImpl implements CbRmbCcbBankRemoteService {
    
    private static final Logger logger = LoggerFactory.getLogger(CbRmbCcbBankServiceImpl.class);

    private CbRmbSocketTransportImpl cbRmbSocketTransportImpl;

    @Override
    public CbRmbResponseMsg submit(CbRmbNotificationMsg msg) throws GopayException {
        
        logger.error("=========this is bis bank =============" + ReflectionToStringBuilder.toString(msg));
        return cbRmbSocketTransportImpl.submit(msg);
    }

    public void setCbRmbSocketTransportImpl(CbRmbSocketTransportImpl cbRmbSocketTransportImpl) {
        this.cbRmbSocketTransportImpl = cbRmbSocketTransportImpl;
    }
    
    @Override
	public CbRmbQueryRespMsg findCbRmbCcbResult(CbRmbQueryReqMsg reqMsg) throws GopayException {
    	 logger.error("=========this is bis bank query =============" + ReflectionToStringBuilder.toString(reqMsg));
         return cbRmbSocketTransportImpl.query(reqMsg);
	}
    
    

    @Override
    public String callBIS(CbRmbNotificationMsg msg,CbRmbResponseMsg responseMsg) throws GopayException{
           return null;
    }

	@Override
	public String findCbRmbCcbResultByGopayOrderId(String goapayOrderId) throws GopayException {
		return null;
	}

	
}
